module: Avoid ABI changes when debug info is disabled
authorBen Hutchings <benh@debian.org>
Wed, 2 Mar 2022 20:22:28 +0000 (21:22 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Tue, 29 Mar 2022 20:46:53 +0000 (21:46 +0100)
commit4134e6b029b26028ae1f50d9081b1878f267ac18
tree4c3a2347ff20d67421342e47e73a1c165d1eee3a
parent8508211468089eb7e8c07f1fe6ac60a965d8f98e
module: Avoid ABI changes when debug info is disabled

Forwarded: not-needed

CI builds are done with debug info disabled, but this removes some
members from struct module and replaces some BTF-related exports with
static definitions.  This causes builds to fail if there is an ABI
reference for the current ABI.

- Add a new config symbol DEBUG_INFO_BTF_MODULES_NOOP which can be
  enabled when DEBUG_INFO is not enabled
- When the symbol is enabled:
  - Define the BTF-related members of struct module
  - Export the no-op definitions of BTF-related functions
  - Define and export the same BTF-related static lists

Gbp-Pq: Topic debian
Gbp-Pq: Name module-avoid-abi-changes-when-debug-info-is-disabled.patch
include/linux/btf.h
include/linux/module.h
kernel/bpf/btf.c
lib/Kconfig.debug